JAVAHOME = /usr/cogsci/java

includes = -I $(JAVAHOME)/include \
           -I $(JAVAHOME)/include/solaris \
           -I $(WNHOME)/include

wnjni_objects = CSynset.o CIndex.o CSenseIndex.o

lib_dir = $(WNHOME)/src/lib

all : wnjni

clean :
	rm *.o *.so $(lib_dir)/libwnjni.so

wnjni : libwnjni.so
	cp libwnjni.so $(lib_dir)

libwnjni.so : $(wnjni_objects)
	g++ $(wnjni_objects) -L/$(lib_dir) -lwn -G -o libwnjni.so

CSynset.o : CSynset.cpp wnjni.h
	g++ -c CSynset.cpp $(includes)

CIndex.o : CIndex.cpp wnjni.h
	g++ -c CIndex.cpp $(includes)

CSenseIndex.o : CSenseIndex.cpp wnjni.h
	g++ -c CSenseIndex.cpp $(includes)
